# globals. Acts as a comunication layer
from math import *

# session constants (config) #################################################

# set to True at startup if sound pipeline detected ok. 
sound_available = False

# if true the game will not even try to use sound. User setting, normal is False
sound_disabled = False

# if troubles with joystick, set this to true to totally ignore joystick
force_no_joystick = False

general_volume = 0.5
sfx_volume = 1.0
music_volume = 1.0

# media type to use for background. False -> .jpg, more secure. User setting.
use_svg_bg = False

languaje = 'en'

# path settings, regenerated at each start
data_dir = None

# game constants - a central place to tweak the gameplay #####################

quack_recovery_time = 0.1
swarm_reschedule_time = 0.5

# model consts
dt_cap = 0.1
world_height = 600.0
stage_width = 800.0
world_viewport_width = 800.0
scroll_overshot = 100.0
scroll_vel = 10.0 
goal_width = 20.0
goal_line_to_bucket_dist = goal_width * 2
interstage_gap = 10.0
min_feature_length = 2.0
player_r = 30.0
pigeon_r = 15.0
player_fastness = 100.0
pigeon_fastness = 80.0
pigeon_kickout_fastness = 120.0
pigeon_think_delta = 10.0/player_fastness 
pigeon_detach_distance = 200.0
pigeon_visual_reach_far = 100.0
pigeon_visual_reach_near = 30.0
pigeon_visual_semiangle = radians(45/2)
pigeon_no_wayback = True
mapactors_to_color4 = {
    'terrain': (164,106,158,255),
    'bird_player1':(255,0,0,255),
    'pigeon_player1':(254,0,0,255),
    'bird_player2':(0,0,255,255),
    'pigeon_player2':(0,0,254,255),
    'goal_zone_player1':(200,0,0,255),
    'goal_zone_player2':(0,0,140,255),
    'goal_zone_dual':(0,140,0,255)
    }
params_for_mapactors = { # <mapactor>:( atype, subtype, ...)
    'terrain': ('terrain', ''),
    'bird_player1':('bird', 'player1'),
    'pigeon_player1':('pigeon', 'player1'),
    'bird_player2':('bird', 'player2'),
    'pigeon_player2':('pigeon', 'player2'),
    'goal_zone_player1':('goal_zone','player1'),
    'goal_zone_player2':('goal_zone','player2'),
    'goal_zone_dual':('goal_zone','dual')
    }

# state last game for Hi score ###############################################
stats = { 'bWin':True, 'score':0, 'stage':0 }

# section 1: things that do not change from the end of startup
# to the end of session.
# available services (callables with no params) registers there;
# convention : services['s_foo'] = foo
services = {}
